﻿
using System;
using System.Collections.ObjectModel;
using AdventureWorksLT.Web.Models;

namespace AdventureWorksLT.Views.Customers.DesignerData
{
    public class DesignTimeSalesOrderDetail : ObservableCollection<SalesOrderDetail>
    {
        
        public DesignTimeSalesOrderDetail()
        {
          for (int i = 0; i < 10; i++)
            {
                Add(CreateDesignSalesOrderDetails(i));
            }
        }

        public SalesOrderDetail CreateDesignSalesOrderDetails(int i)
        {
          var salesOrderDetails = new SalesOrderDetail()
            {
            		SalesOrderID = 1+i, //Int32   #SalesOrderHeader
		SalesOrderDetailID = 2+i, //Int32
		OrderQty = (short) (3+i), //Int16
		ProductID = 4+i, //Int32   #Product
		UnitPrice = 5+i, //Decimal
		UnitPriceDiscount = 6+i, //Decimal
		LineTotal = 7+i, //Decimal
		rowguid = Guid.NewGuid(), //Guid
		ModifiedDate = Convert.ToDateTime("12/07/2010"), //DateTime
		};
		 return salesOrderDetails;
        }
      }
}


